<!DOCTYPE html>
<html lang="zh-cmn-Hans-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>大学生成绩录入</title>
    <style>
        #app {
            margin: 20px auto;
            width: 600px;
        }
        #app p{
            margin-left: 20px;
        }
        #msg{
            text-align: center;
        }
    </style>
</head>
<body>
<div id="app">
    <fieldset style="width: 300px">
        <legend>大学生成绩录入</legend>
        <p>
            <label>学生姓名：</label>
            <input type="text" v-model="name" placeholder="请输入姓名..."/>
        </p>
        <p>
            <label>学生成绩：</label>
            <input type="text" v-model="score" placeholder="请输入成绩..."/>
        </p>
        <div id="msg">
            <div v-if="score>70">
                <h4 :style="{color:'green'}">{{name}}成功晋级！</h4>
            </div>
            <div v-else>
                <h4 :style="{color:'red'}">{{name}}，你还需努力，加油学习！</h4>
            </div>
        </div>
    </fieldset>
</div>
<script src="./js/vue.min.js"></script>
<script>
    var vm = new Vue({
        el: "#app",
        data:{
            name:"白墨",
            score:100
        }
    });
</script>
</body>
</html>
